package com.learn.controller;

import com.learn.service.SystemService;
import com.learn.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 *
 * @author: hbliy
 * @date: 2025/11/4 15:44
 */
@RestController
@RequestMapping("/user")
public class UserController {

    private final UserService userService;

    public UserController(UserService userService) {
        System.out.println("UserController.UserController");
        this.userService = userService;
    }

    @Autowired
    public UserController(UserService userService, SystemService service) {
        System.out.println("UserController.UserController SystemService");
        this.userService = userService;
    }

    @GetMapping("/name")
    public String getUserName() {
        return userService.getUserName();
    }
}
